

<div style="float:right;">[<%= link_to "view as graph", graphs_logged_controllers_path, :class => "caps_link" %>]</div>
<h1>Logged Controllers: Table</h1>

<center>
<table class="parent_list">
  <tr class="title_row">
    <th rowspan="2">Controller Name <%= sort_arrows("name", @sortby, @dir) %></th>
    <th rowspan="2">Total Hits <%= sort_arrows("count", @sortby, @dir) %></th>
    <th colspan="3">Average times (in seconds)</th>
  </tr>
  <tr class="title_row">
    <th class="small">Completion <%= sort_arrows("completion_time", @sortby, @dir) %></th>
    <th class="small">Render <%= sort_arrows("render_time", @sortby, @dir) %></th>
    <th class="small">DB <%= sort_arrows("db_time", @sortby, @dir) %></th>
  </tr>
<% for logged_controller in @logged_controllers -%>
  <tr>
    <td>
      <div style="float:right; margin-left: 10px;">
        <%= link_to "zoom", logged_controller_url(logged_controller), 
              :class => "caps_link" %>
      </div>
      <div style="white-space:nowrap; margin-right: 20px;">
        <%= link_to_remote "+ #{logged_controller.title_name}", 
              :url => { :action => :show_in_table, :id => logged_controller, 
                :sortby => @sortby, :dir => @dir },
              :method => :get, :html => { :id => "remote_link_for_#{logged_controller.id}" } %>
        
      </div>
    </td>
    <td class="numbers"><%= logged_controller.count %></td>
    <td class="numbers"><%= logged_controller.average_completion_time.to_decimal_string %></td>
    <td class="numbers"><%= logged_controller.average_render_time.to_decimal_string %></td>
    <td class="numbers"><%= logged_controller.average_db_time.to_decimal_string %></td>
  </tr>
  <tr>
    <td colspan="5" style="padding: 0px; padding-left:20px;">
      <div id="actions_for_<%= logged_controller.id %>" style="display:none;">
        
      </div>
    </td>
  </tr>
<% end -%>
</table>

</center>

